//
//  UUUserManager.h
//  UUCharterSupplier
//
//  Created by ZhangAo on 09/03/2018.
//  Copyright © 2018 UUCharter. All rights reserved.
//

#import <UUFoundation/DKBaseManager.h>
#import "UUUserInfo.h"

@protocol UUUserManagerObserver

- (void)userDidUpdate;

@end

#define GetUserManager()        ([UUUserManager sharedInstance])

@interface UUUserManager : DKBaseManager

- (void)asyncFetchUserInfoWithCompleteBlock:(void (^ _Nullable)(UUUserInfo * _Nullable userInfo, NSError * _Nullable error))completeBlock;

- (UUUserInfo * _Nullable)fetchUserInfo;

// 把 UserInfo 缓存设为过期
- (void)setNeedsUpdateUserInfo;

// 更新用户头像
- (void)asyncUpdateUserAvatar:(NSString * _Nonnull)avatar
                completeBlock:(void (^ _Nonnull)(NSError * _Nullable error))completeBlock;

@end
